-- GENERATED SPELL FOR [Mag'har Pitfighter] --


function spell0_19140(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(33424,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19140', 589, 1)
end

function spell1_19140(pUnit, Event) --@Lights Out,n/a--
pUnit:FullCastSpellOnTarget(33425,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19140', 605, 1)
end

function spell2_19140(pUnit, Event) --@Punch,n/a--
pUnit:FullCastSpellOnTarget(33423,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19140', 519, 1)
end

function Sorts_19140(pUnit, Event)
local choix_sorts_19140 = math.random(0, 2)
if choix_sorts_19140 == 0 then
pUnit:RegisterEvent('spell0_19140', 1, 1)
end
if choix_sorts_19140 == 1 then
pUnit:RegisterEvent('spell1_19140', 1, 1)
end
if choix_sorts_19140 == 2 then
pUnit:RegisterEvent('spell2_19140', 1, 1)
end
end

function mob19140_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19140', math.random(1500, 3000), 1)
end

function mob19140_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19140_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19140_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19140, 1, 'mob19140_Action')
RegisterUnitEvent(19140, 2, 'mob19140_Leave')
RegisterUnitEvent(19140, 3, 'mob19140_Kill')
RegisterUnitEvent(19140, 4, 'mob19140_Die')
